#ifndef ODN_BASEENTITY_H
#define ODN_BASEENTITY_H

#include <RakNet\NetworkIDGenerator.h>

#include "ODN_String.h"
#include "ODN_Message.h"

#define DECLARE_ENTITY_CLASS(className) static ouden::CBaseEntity* create(ouden::String sName){return new className(sName);}

namespace ouden {

class CBaseEntity// : public IMessageReceiver
{
	//TODO: Check that this is needed, just a thought that it might be from something old
	//Give the CGameWorld class access to the entity constructor
	friend class CGameWorld;
	
	public:
		
		//Main update function for all entities
		//TODO: Fix this up after
		virtual void update() = 0;
		
		//Get the name of the entity
		String getName() 		{ return m_sName; }
		
	protected:
		
		//Constructor and destructor
		//These are protected so that an entity can only be instantiated through
		// the createEntity() function of CGameWorld as it is given friend access
		CBaseEntity(String sName);
		virtual ~CBaseEntity();
		
		//Name identifier of the entity
		//String m_sName;
		String m_sName;
		
	private:
};
/*
//Wrapper for an object with a network identification number
//Derive all networked objects from this
class CNetworkObject : public NetworkIDGenerator
{
	
public:
	
	//Override the pure virtual function to let it know whether it's the server
	//TODO: Make sure this is what it's sposed to be, cause a little unsure
	virtual bool IsNetworkIDAuthority(void) const;
	
protected:
	
	CNetworkEntity(String sName) : CBaseEntity(sName) 		{}
	virtual ~CNetworkEntity() 		{}
	
};
*/
} //namespace ouden

#endif // ODN_BASEENTITY_H
